package com.liqi.frame.comm.util;


import cn.hutool.crypto.digest.DigestUtil;

/**
 * 密码工具类
 * Created by liqi on 2018/1/26.
 * liqiwork@qq.com
 */
public class PasswordUtil {
    /**
     * 生成密码的密文
     * @param username 用户名
     * @param password 密码
     * @return 加密后的密文
     */
    public static String encrypt(String username, String password) {
        password = DigestUtil.md5Hex(username.toLowerCase()+"~"+password);
        return password;
    }
}
